import Home from '../views/Home.vue'
import Homepage from '../views/list/homepage.vue'
import Table from '../views/list/Table.vue'
import Vue from 'vue'
import VueRouter from 'vue-router'
import LoadCity from "../views/LoadCity";
import IndexPage from "../views/IndexPage"
import ConfirmBook from "../views/ConfirmBook";
import Manager from "../views/Manager";
import InsertFlight from "../views/flight/insertFlight";
import QueryFlight from "../views/flight/queryFlight"
import SummaryFlight from "../views/flight/summaryFlight"
import UpdateFlight from "../views/flight/UpdateFlight";
import TicketManage from "../views/ticket/TicketManage";
import ManagerLogin from "../views/ManagerLogin";
import PassengerLogin from "../views/passenger/PassengerLogin";
import PassengerCenter from "../views/passenger/PassengerCenter";
import PassengerRegister from "../views/passenger/PassengerRegister";
import MyBill from "../views/passenger/MyBill";
import MyDetail from "../views/passenger/MyDetail";
import MyNotation from "../views/passenger/MyNotation";
import MyTicket from "../views/passenger/MyTicket";
import EditInfo from "../views/passenger/EditInfo";
import QueryUser from "../views/user/queryUser"
import UpdatePassenger from "../views/user/UpdatePassenger";

let routes = [


  {
    path: '/passengerLogin',
    component: PassengerLogin
  },
  {
    path: '/passengerRegister',
    component: PassengerRegister
  },
  {
    path: '/passenger',
    component: PassengerCenter,
    children:[
      {
        path:'editInfo',
        component: EditInfo
      },
      {
        path:'myDetail',
        component: MyDetail
      },
      {
        path:'myTicket',
        component: MyTicket
      },
      {
        path:'myBill',
        component:MyBill
      },
      {
        path:'myNotation',
        component: MyNotation
      }
    ]
  },
  {
    path: '/',
    redirect: '/indexPage'
  },


  {
    path: '/indexPage',
    component: IndexPage
  },
  {
    name: 'confirmBook',
    path: '/confirmBook',
    component: ConfirmBook
  },
  {
    path: '/managerLogin',
    component: ManagerLogin
  },
  {
    path: '/manager',
    component: Manager,
    children: [
      {
        path: 'insertFlight',
        component: InsertFlight
      },
      {
        path: 'updateFlight',
        component: UpdateFlight
      },
      {
        path: 'queryFlight',
        component: QueryFlight
      },
      {
        path: 'summaryFlight',
        component: SummaryFlight
      },
      {
        path: 'ticketManage',
        component: TicketManage
      },
      {
        path: 'queryUser',
        component: QueryUser
      },
      {
        path:'updatePassenger',
        component: UpdatePassenger
      }
    ]
  }
];
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})
export default router;
